package com.company;

public class Main {

    public static void main(String[]args) {
        People p1 = new Student("A", 0, "模电实验室", "生物实验室");        //学生A负责实验室
        People p2 = new Student("B", 0, "化学实验室", "物理实验室");     //学生B负责实验室
        System.out.println("学生信息：");
        System.out.println(p1);
        System.out.println(p2);
        Lab r1 = new Lab("模电实验室", "优秀");            // 优秀奖金600元
        Lab r2 = new Lab("生物实验室", "不及格");            // 不及格奖金50元
        Lab r3 = new Lab("化学实验室", "及格");               // 及格奖金300元
        Lab r4 = new Lab("物理实验室", "及格");

        System.out.println("实验室：");       //实验室等级报表
        System.out.println(r1);
        System.out.println(r2);
        System.out.println(r3);
        System.out.println(r4);

        System.out.println("        ");
        System.out.println("学生实验室等级评级：");         //学生实验室等级评级
        System.out.println("A等级为" + r1.level + "的实验室为:" + p1.tab1);
        System.out.println("A等级为" + r2.level + "的实验室为:" + p1.tab2);
        System.out.println("B等级为" + r3.level + "的实验室为:" + p2.tab1);
        System.out.println("B等级为" + r4.level + "的实验室为:" + p2.tab2);

        try {                                                   //周收入和总收入计算
            double result1 = Tex.sum(600, 50);
            System.out.println("A的周收入:" + result1);
            p1.income = result1;
            p1.income = p1.income * 18;
            System.out.println("A的总收入：" + p1.income);
            double result3 = Tex.avg(p1.income);
            System.out.println("A税后的收入：" + result3);
            double result2 = Tex.sum(300, 300);

            System.out.println("B的周收入:" + result2);
            p2.income = result2;
            p2.income = p2.income * 18;
            System.out.println("B的总收入:" + p2.income);
            double result4 = Tex.avg(p2.income);
            System.out.println("B税后收入:" + result4);

        } catch (Exception213 e) {                       //系统特殊反馈（输入负数；不交税）
            System.out.println(e);
        }
    }
}